package com.cmc.cloud.cmclink.doc.convert;

import com.cmc.cloud.cmclink.doc.api.document.rep.manifestrep.manifestscn.ManifestScnCreateReqVO;
import com.cmc.cloud.cmclink.doc.api.document.rep.manifestrep.manifestscn.ManifestScnRespVO;
import com.cmc.cloud.cmclink.doc.api.document.rep.manifestrep.manifestscn.ManifestScnUpdateReqVO;
import com.cmc.cloud.cmclink.doc.entity.ManifestScnDO;
import com.cmc.cloud.cmclink.doc.entity.SoScnDO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * 舱单相关方信息 Convert
 *
 * @author chenzheng
 */
@Mapper
public interface ManifestScnConvert {
    /**
     * 获取转换接口的实例
     */
    ManifestScnConvert INSTANCE = Mappers.getMapper(ManifestScnConvert.class);

    /**
     * 将创建请求VO转换为DO
     *
     * @param bean 创建请求VO
     * @return DO
     */
    ManifestScnDO convert(ManifestScnCreateReqVO bean);

    /**
     * 将创建请求VO转换为DO
     *
     * @param bean 创建请求VO
     * @return DO
     */
    List<ManifestScnDO> convertCreateReqList(List<ManifestScnCreateReqVO> bean);

    /**
     * 将创建请求VO转换为DO
     *
     * @param bean 创建请求VO
     * @return DO
     */
    ManifestScnDO convert(SoScnDO bean);


    /**
     * 将更新请求VO转换为DO
     *
     * @param bean 更新请求VO
     * @return DO
     */
    ManifestScnDO convert(ManifestScnUpdateReqVO bean);

    /**
     * 将更新请求VO转换为DO
     *
     * @param bean 更新请求VO
     * @return DO
     */
    List<ManifestScnDO> convertUpdateList(List<ManifestScnUpdateReqVO> bean);


    /**
     * 将DO转换为查询响应VO
     *
     * @param bean DO
     * @return VO
     */
    ManifestScnRespVO convert(ManifestScnDO bean);

    /**
     * 将DO列表转换为查询响应VO列表
     *
     * @param list DO列表
     * @return VO List
     */
    List<ManifestScnRespVO> convertList(List<ManifestScnDO> list);

}
